import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
// 导入 Element Plus 模块
import ElementPlus from 'element-plus'
// 导入 Element Plus 样式
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import api from './utils/api'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(ElementPlus)
// 全局注册 Element Plus 图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.config.globalProperties.api = api;
app.mount('#app')
